import * as Types from "@/store/action-types.js";
import { fetchSlides } from "@/api/home.js";

const homeActions = {
  async [Types.SET_SLIDES]({ commit }) {
    let slides = await fetchSlides();
    // console.log(slides);
    // 交给mutation去更改状态
    commit(Types.SET_SLIDES, slides);
  },
};
export default homeActions;
